import pygame,sys,random
pygame.init()
screen=pygame.display.set_mode([640,480])
screen.fill([255,255,255])
for i in range(1000):
    width=random.randint(0,250)
    height=random.randint(0,100)
    top=random.randint(0,400)
    left=random.randint(0,500)
    pygame.draw.rect(screen,[255,0,0],[left,top,width,height],1)
pygame.display.flip()
running=True
while running:
    for even in pygame.event.get():
        if even.type==pygame.QUIT:
            running=False
pygame.quit()